<template>
  <div class="right-container">
    <h3>Right 组件 --{{ dataFromLeft }}</h3>
    <h3>Bus值 {{ valueFromBus }}</h3>
  </div>
</template>

<script>
import bus from '@/utils/bus'

export default {
  name: 'MyRight',
  data () {
    return {
      dataFromLeft: 1,
      valueFromBus: 1
    }
  },
  created () {
    bus.$on('getBus', (bus) => {
      this.valueFromBus = bus
    })
  }
}
</script>

<style lang="scss">
.right-container {
  padding: 0 20px 20px;
  background-color: lightskyblue;
  min-height: 250px;
  flex: 1;
}
</style>
